{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>A</th>\n",
       "      <th>B</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>-5.0</td>\n",
       "      <td>25.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>-4.0</td>\n",
       "      <td>16.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>-3.0</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>-2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>-1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0.0</td>\n",
       "      <td>0.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>1.0</td>\n",
       "      <td>1.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>2.0</td>\n",
       "      <td>4.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>3.0</td>\n",
       "      <td>9.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>4.0</td>\n",
       "      <td>16.0</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "     A     B\n",
       "0 -5.0  25.0\n",
       "1 -4.0  16.0\n",
       "2 -3.0   9.0\n",
       "3 -2.0   4.0\n",
       "4 -1.0   1.0\n",
       "5  0.0   0.0\n",
       "6  1.0   1.0\n",
       "7  2.0   4.0\n",
       "8  3.0   9.0\n",
       "9  4.0  16.0"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Use %xl_get to fetch data as a pandas DataFrame\n",
    "df = %xl_get --cell B31\n",
    "df"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Use %xl_set to set data back in Excel\n",
    "df[\"C\"] = df[\"A\"].apply(lambda x: x ** 3)\n",
    "%xl_set df --cell F31"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Set the index of the DataFrame from column A\n",
    "df = df.set_index(\"A\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPIAAAC2CAYAAADjodDeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjMuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8vihELAAAACXBIWXMAAAsTAAALEwEAmpwYAAAcMklEQVR4nO3deXiU5b3/8fd3JpOZhCUkkBBCDERkCwrIEhbX4q7Hn+LSg63S67TnULU9as+vUkCttlTkcI7bZa2/S0XUKKDSolZLaa2VTUlY3EhYZAkQSAIEyL5MZu7fHzNJBkggZGbyDJPv67rmmswzM/fzhZnP3M9zzz3PI8YYlFLnNpvVBSilgqdBVioKaJCVigIaZKWigAZZqSigQVYqCsRYXUB79enTxwwcONDqMpSyzKZNm44YY5Jbu++cCf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NsrqmQCLyC/9rukVElojI2f3KIcTO+SCLiB14EbgByALuEpEsa6tq1gj8X2PMcGAi8LMIqq3Jg8BWq4toxfPAX40xw4BRRFCNItIfeAAYZ4y5ELADlv6G9pwPMpAN7DTG7DbGNABLgVssrgkAY0yxMWaz/+9KfG/G/tZW1UJE0oGb8J3mNmKISE/gcmAhgDGmwRhz3NKiThUDxIlIDBAPHLSymGgIcn9gf8DtIiIoLE1EZCBwMZBrcSmBngNmAl6L6zjZ+cBhYJF/s/9VEelmdVFNjDEHgP8F9gHFQLkx5m9W1hQNQW7tVIsRNRQvIt2BPwIPGWMqrK4HQET+BThkjNlkdS2tiAHGAC8ZYy4GqoFIGvtIxLfVlwmkAd1ExNIzIkRDkIuA8wJup2PxZk4gEXHgC/Hbxpg/WV1PgEuA/yMihfh2R6aIyFvWltSsCCgyxjRtvSzDF+xIcTWwxxhz2BjjBv4ETLayoGgI8gZgsIhkikgsvkGHDy2uCQDxnZh5IbDVGPOM1fUEMsbMNsakG2MG4vs/+9QYExHn2THGlAD7RWSof9FVQIGFJZ1sHzBRROL9r/FVWDwYd84fIcQY0ygiPwdW4hs9fM0Yk29xWU0uAe4BvhWRr/zL5hhj/mJdSeeM/wTe9n847wb+zeJ6mhljckVkGbAZ3zcTX2LxLC+d2aVUFIiGTWulujwNslJRQIOsVBTQICsVBTTISkUBDbJSUUCDrFQU0CArFQX+Py+yxw2Idr6EAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 250x200 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "# Use %xl_plot to plot data in Excel\n",
    "ax = df.plot()\n",
    "%xl_plot ax --cell J29 --width 250 --height 200 --name \"example plot\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Calling in to Excel can be done using pyxll.xl_app\n",
    "from pyxll import xl_app\n",
    "xl = xl_app()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 48,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# For example, change the selection to A1:K20\n",
    "r = xl.Range(\"A1:K20\")\n",
    "r.Select()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
